home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / netz / term / extras / source / gtlayout-source.lha / LTP_DrawIncrementer.c < prev    next >
C/C++ Source or Header  |  1995-03-25  |  652b  |  39 lines

  1. /*  GadTools layout toolkit
  2. **
  3. **  Copyright © 1993-1995 by Olaf `Olsen' Barthel
  4. **  Freely distributable.
  5. */
  6.  
  7. #include "gtlayout_global.h"
  8.  
  9. VOID __regargs
  10. LTP_DrawIncrementer(struct RastPort *rp,BOOLEAN leftDirection,LONG left,LONG top,LONG width,LONG height)
  11. {
  12.     LONG middle;
  13.     LONG x0,x1;
  14.     LONG stop;
  15.  
  16.     middle = height / 2;
  17.  
  18.     if(leftDirection)
  19.     {
  20.         x0 = left + 2;
  21.         x1 = left + width - 3;
  22.     }
  23.     else
  24.     {
  25.         x0 = left + width - 3;
  26.         x1 = left + 2;
  27.     }
  28.  
  29.     if(height > width)
  30.         stop = (width - 4) / 2;
  31.     else
  32.         stop = (height - 4) / 2;
  33.  
  34.     Move(rp,x0,top + middle);
  35.     Draw(rp,x1,top + middle - stop);
  36.     Move(rp,x0,top + middle);
  37.     Draw(rp,x1,top + middle + stop);
  38. }
  39.